import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/views/Login'
import home from '../views/Home.vue'
import User from '@/views/user/user.vue'
import Welcome from '@/views/user/welcome'
import Rights from '@/views/rights'
import Roles from '@/views/roles/roles'



Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/login',
      name: 'login',
      component: Login
    },
    {
      path:'/',
      name:'home',
      component:home,
      redirect:{path:'welcome'},
      children:[
        {
          name:'welcome',
          path:'welcome',
          component:Welcome
        },
        {
          path:'user',
          name:'user',
          component:User
        },
        {
          path:'rights',
          name:'rights',
          component:Rights
        },
        {
          path:'roles',
          name:'roles',
          component:Roles
        },
      
      ]
    }
  ]
})
